package br.com.imob.ws.service;

import java.net.MalformedURLException;

import org.codehaus.xfire.XFire;
import org.codehaus.xfire.XFireFactory;
import org.codehaus.xfire.client.XFireProxyFactory;
import org.codehaus.xfire.service.Service;
import org.codehaus.xfire.service.binding.ObjectServiceFactory;


public class PropertyFactory {
	
	private static final String URL = "http://localhost:8080/livro_android_xfire/services/PropertyWS";

	public static PropertyWS getService() throws MalformedURLException {
		Service serviceModel = new ObjectServiceFactory().create(PropertyWS.class);


		XFire xfire = XFireFactory.newInstance().getXFire();
		XFireProxyFactory factory = new XFireProxyFactory(xfire);


		PropertyWS service = (PropertyWS)  factory.create(serviceModel,URL);
		
		return service;
	}


}
